next up previous contents index
Next: The Goto statement Up: Statements controlling program flow. Previous: The Case statement

The For..to/downto..do statement

Free Pascal supports the For loop construction. The prototypes are:

For Counter:=Lowerbound to Upperbound Do Statement;

or 

For Counter:=Upperbound downto Lowerbound Do Statement;
Statement can be a compound statement. In the first case, if Lowerbound is larger than Upperbound then Statement will never be executed.

Michael Van Canneyt
Tue Mar 31 16:48:49 CEST 1998